package com.letv.whatslive.model.dto;

import com.letv.whatslive.common.utils.ObjectUtils;
import com.letv.whatslive.model.AppInfo;
import lombok.Getter;
import lombok.Setter;

/**
 * Created by haojiayao on 16-1-5.
 */
@Getter
@Setter
public class AppDTO {

    private Long id; // ID
    private String appName; // APP名
    private String introduce; // 简介
    private String iconUrl; // 图标URL
    private String downloadUrl; // 下载URL

    public AppDTO () {}

    public AppDTO(AppInfo appInfo) {

        this.id = ObjectUtils.toLong(appInfo.getId());
        this.appName = ObjectUtils.toString(appInfo.getName(), "");
        this.introduce = ObjectUtils.toString(appInfo.getDescribe(), "");
        this.iconUrl = ObjectUtils.toString(appInfo.getIconUrl(), "");
        this.downloadUrl = ObjectUtils.toString(appInfo.getDownLoadUrl(), "");
    }
}
